package com.gladlee.ACP;

import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public abstract class AtomUser {
	protected Atom atom;
	protected String configFileName = "atomUserConfig.xml";

	public void endSend() {
	}

	public void endReceive() {
	}

	public void setConfigFileName(String configFileName) {
		this.configFileName = configFileName;
	}

	protected Set<String> ipSet = new HashSet<String>();

	public Set<String> getIpSet() {
		return ipSet;
	}

	public void setIpSet(Set<String> ipSet) {
		this.ipSet = ipSet;
	}

	protected int sendPeriod;

	public int getSendPeriod() {
		return sendPeriod;
	}

	public void setSendPeriod(int sendPeriod) {
		this.sendPeriod = sendPeriod;
	}

	public abstract int getIntData(String cc, Map<String, byte[]> map);

	public abstract byte getByteData(String cc, Map<String, byte[]> map);

	public abstract boolean getBooleanData(String cc, Map<String, byte[]> map);

	public abstract float getFloatData(String cc, Map<String, byte[]> map);

	public abstract double getDoubleData(String cc, Map<String, byte[]> map);

	public abstract char getCharData(String cc, Map<String, byte[]> map);

	public abstract String getStringData(String cc, Map<String, byte[]> map);

	public abstract void putIntData(String cc, int data);

	public abstract void putDoubleData(String cc, double data);

	public abstract void putStringData(String cc, String data);

	public abstract void send();

	public abstract void receive();

	protected abstract void init();

	public void setAtom(Atom a) {
		atom = a;
	}

	public AtomUser() {
		// ipSet=new TreeSet<String>();
		// init();
	}

}
